<?php
// 2011-06-12 13:54
class CityAction extends Action
{
    /**
    +----------------------------------------------------------
    * 默认操作
    +----------------------------------------------------------
    */
    public function index()
    {
        
				//$City = M("City1"); // 实例化City对象    
				$City = M("City");
				import("@.ORG.Page"); //导入分页类
				$count = $City->count();    //计算总数
				$p = new Page( $count, 10);
				$list=$City->limit($p->firstRow.','.$p->listRows)->order('id asc')->findAll();
				$p->setConfig('header','条记录');
				$p->setConfig('prev',"<");
				$p->setConfig('next','>');
				$p->setConfig('first','<<');
				$p->setConfig('last','>>');
				$page = $p->show();
				$this->assign( "page", $page );
				$this->assign( "list", $list );
				$this->display(APP_PATH.'/Tpl/default/city.html');
    }

}
?>